#!/usr/bin/env bash

set -ve

export LFS='/mnt/lfs'
export SCRIPT_PATH=$(cd $(dirname $0); pwd)

sudo mkdir -pv $LFS/sources
sudo chmod -v a+wt $LFS/sources

python3 $SCRIPT_PATH/003.packages.py
sudo wget --input-file=/tmp/lfs-wget-list --continue --directory-prefix=$LFS/sources
pushd $LFS/sources
md5sum -c md5sums
popd

# sudo wget --continue --directory-prefix=$LFS/sources http://iso.mirrors.ustc.edu.cn/lfs/lfs-packages/lfs-packages-8.4.tar
# pushd $LFS/sources
# tar -xvf lfs-packages-8.4.tar
# md5sum -c md5sums
# popd
